from datetime import datetime
from typing import List, Union

from pydantic import Field

from forward.extend.pydantic.base import BaseSchema


class AdminSchema(BaseSchema):
    username: str  # 账号
    nickname: str  # 昵称
    avatar: str | None = None  # 头像
    role_ids: Union[List[int], str]  # 角色
    dept_ids: Union[List[int], str]  # 部门
    post_ids: Union[List[int], str]  # 岗位
    is_multipoint: int = 0  # 多端登录: [0=否, 1=是]
    is_disable: int = 0  # 是否禁用: [0=否, 1=是]
    is_delete: int = 0
    salt: str
    password: str


class AdminOutSchema(AdminSchema):
    id: int
